package com.wxtl.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * LkCustPlugId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class LkCustPlugId implements java.io.Serializable {

	// Fields

	private Integer custId;
	private String plugCode;
	private Timestamp regTime;
	private Timestamp deadline;
	private Integer state;
	private Integer renewTotal;
	private String initVersion;

	// Constructors

	/** default constructor */
	public LkCustPlugId() {
	}

	/** minimal constructor */
	public LkCustPlugId(Integer custId) {
		this.custId = custId;
	}

	/** full constructor */
	public LkCustPlugId(Integer custId, String plugCode, Timestamp regTime,
			Timestamp deadline, Integer state, Integer renewTotal,
			String initVersion) {
		this.custId = custId;
		this.plugCode = plugCode;
		this.regTime = regTime;
		this.deadline = deadline;
		this.state = state;
		this.renewTotal = renewTotal;
		this.initVersion = initVersion;
	}

	// Property accessors

	@Column(name = "custId", nullable = false)
	public Integer getCustId() {
		return this.custId;
	}

	public void setCustId(Integer custId) {
		this.custId = custId;
	}

	@Column(name = "plugCode", length = 20)
	public String getPlugCode() {
		return this.plugCode;
	}

	public void setPlugCode(String plugCode) {
		this.plugCode = plugCode;
	}

	@Column(name = "regTime", length = 19)
	public Timestamp getRegTime() {
		return this.regTime;
	}

	public void setRegTime(Timestamp regTime) {
		this.regTime = regTime;
	}

	@Column(name = "deadline", length = 19)
	public Timestamp getDeadline() {
		return this.deadline;
	}

	public void setDeadline(Timestamp deadline) {
		this.deadline = deadline;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "renewTotal")
	public Integer getRenewTotal() {
		return this.renewTotal;
	}

	public void setRenewTotal(Integer renewTotal) {
		this.renewTotal = renewTotal;
	}

	@Column(name = "initVersion", length = 10)
	public String getInitVersion() {
		return this.initVersion;
	}

	public void setInitVersion(String initVersion) {
		this.initVersion = initVersion;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LkCustPlugId))
			return false;
		LkCustPlugId castOther = (LkCustPlugId) other;

		return ((this.getCustId() == castOther.getCustId()) || (this
				.getCustId() != null && castOther.getCustId() != null && this
				.getCustId().equals(castOther.getCustId())))
				&& ((this.getPlugCode() == castOther.getPlugCode()) || (this
						.getPlugCode() != null
						&& castOther.getPlugCode() != null && this
						.getPlugCode().equals(castOther.getPlugCode())))
				&& ((this.getRegTime() == castOther.getRegTime()) || (this
						.getRegTime() != null && castOther.getRegTime() != null && this
						.getRegTime().equals(castOther.getRegTime())))
				&& ((this.getDeadline() == castOther.getDeadline()) || (this
						.getDeadline() != null
						&& castOther.getDeadline() != null && this
						.getDeadline().equals(castOther.getDeadline())))
				&& ((this.getState() == castOther.getState()) || (this
						.getState() != null && castOther.getState() != null && this
						.getState().equals(castOther.getState())))
				&& ((this.getRenewTotal() == castOther.getRenewTotal()) || (this
						.getRenewTotal() != null
						&& castOther.getRenewTotal() != null && this
						.getRenewTotal().equals(castOther.getRenewTotal())))
				&& ((this.getInitVersion() == castOther.getInitVersion()) || (this
						.getInitVersion() != null
						&& castOther.getInitVersion() != null && this
						.getInitVersion().equals(castOther.getInitVersion())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCustId() == null ? 0 : this.getCustId().hashCode());
		result = 37 * result
				+ (getPlugCode() == null ? 0 : this.getPlugCode().hashCode());
		result = 37 * result
				+ (getRegTime() == null ? 0 : this.getRegTime().hashCode());
		result = 37 * result
				+ (getDeadline() == null ? 0 : this.getDeadline().hashCode());
		result = 37 * result
				+ (getState() == null ? 0 : this.getState().hashCode());
		result = 37
				* result
				+ (getRenewTotal() == null ? 0 : this.getRenewTotal()
						.hashCode());
		result = 37
				* result
				+ (getInitVersion() == null ? 0 : this.getInitVersion()
						.hashCode());
		return result;
	}

}